import request from '@/utils/request'

// 查询会员用户列表
export function listMemberUserManagement(query) {
  return request({
    url: '/member/memberUserManagement/list',
    method: 'get',
    params: query
  })
}
//根据id查询单个用户的详情信息
export function getById(id){
  const data = {
    id
  }
  return request({
    url: '/member/memberUserManagement/getById',
    method: 'put',
    data: data
  })
}

// 查询会员用户详细
export function getMemberUserManagement(id) {
  return request({
    url: '/member/memberUserManagement/' + id,
    method: 'get'
  })
}

// 新增会员用户
export function addMemberUserManagement(data) {
  return request({
    url: '/member/memberUserManagement/add',
    method: 'post',
    data: data
  })
}

// 修改会员用户
export function updateMemberUserManagement(data) {
  return request({
    url: '/member/memberUserManagement/edit',
    method: 'put',
    data: data
  })
}

// 删除会员用户
export function delMemberUserManagement(id) {
  return request({
    url: '/member/memberUserManagement/' + id,
    method: 'delete'
  })
}

//判断会员卡是否绑定会员(hjh)
export function ifMemberCardBind(membershipCardNumber) {
  return request({
    url: '/member/memberUserManagement/ifMemberCardBind?membershipCardNumber=' + membershipCardNumber,
    method: 'get'
  })
}
